RCS "$Id: ActProtected.sig,v 1.6 1998/08/13 11:37:59 pxs Exp $";
(*  This is the private interface of (T)CCS Actions.                         *)
signature ACT_PROTECTED =
sig
  include ACT
(* Primed because we once had a Value in ACT... *)
   structure Value' : VALUE_PROTECTED 
   val valueOf : act -> Value'.value option
   val changeValue : act -> (Value'.value option) -> act

   type port
   structure PortSet : ORDERED_SET
   where type Element.element = port
   val portOf : act -> port option	(* NONE for N/A: tau, etc. *)
(* These will ignore acts/prefixes that have no ports *)
   val portsOfActions : ActionSet.set -> PortSet.set
     
   val makeAct : port * bool * Value'.value option
     -> act (* cheating! *)
(* This doesn't really belong here: Perdita? *)
   val makeAction : string * string option -> act

   val portLe : port * port -> bool
   val portEq : port * port -> bool
   val change : act -> act -> act

   val actionFromPort : port -> act
   val beware : (act -> act) -> (port -> port)
   (* I mean it! Will panic if actfn maps something with port to tau etc.*)
     
   val step     : act

   val hashPort : port -> word
     
(* answer "are these complementary actions?" with info!*)
(* Outer NONE if No. If Yes, (firstWasSender, resultant tau action, *)
(* NONE if no data passed, else SOME extraconstraint for receiver)*)
   val inverses : act * act ->
     (bool * act * Value'.constraint option) option
   val isInput : act -> bool option     (* NONE for N/A: tau, etc. *)

(* if action is a tau, forget what it represents synchronising on.*)
   val noTauOrigin : act -> act
     
   val portString : port -> string

(* Should these be in Act.sig? *)
(* [still] duplicated with things inside Agent's parser, Perdita? *)
(* {a,...,c}, maybe empty, eps and tau not allowed *)
    val readActSet : unit -> act list
   (* Do not use this any more. It's only here for silly historical reasons *)
    val ACTLIST2 : bool -> Lexing.token -> (Lexing.token -> bool) -> (act list)
end

